package com.huawei.zyb.taskManager.interfaces.rest.request;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 添加文档请求
 */
public class AddDocumentRequest {
    
    @NotBlank(message = "文档标题不能为空")
    @Size(max = 200, message = "文档标题长度不能超过200个字符")
    private String title;
    
    @NotBlank(message = "文档URL不能为空")
    @Size(max = 500, message = "文档URL长度不能超过500个字符")
    private String url;
    
    @Size(max = 1000, message = "文档描述长度不能超过1000个字符")
    private String description;
    
    // 构造函数
    public AddDocumentRequest() {}
    
    public AddDocumentRequest(String title, String url, String description) {
        this.title = title;
        this.url = url;
        this.description = description;
    }
    
    // Getter和Setter方法
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getUrl() {
        return url;
    }
    
    public void setUrl(String url) {
        this.url = url;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    @Override
    public String toString() {
        return "AddDocumentRequest{" +
                "title='" + title + '\'' +
                ", url='" + url + '\'' +
                ", description='" + description + '\'' +
                '}';
    }
}